package com.fowo.api.service.handleWork.jindieEntity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class jindieVoucher{


    @JsonProperty("NeedUpDateFields")
    private List<?> needUpDateFields;
    @JsonProperty("NeedReturnFields")
    private List<?> needReturnFields;
    @JsonProperty("IsDeleteEntry")
    private String isDeleteEntry;
    @JsonProperty("SubSystemId")
    private String subSystemId;
    @JsonProperty("IsVerifyBaseDataField")
    private String isVerifyBaseDataField;
    @JsonProperty("IsEntryBatchFill")
    private String isEntryBatchFill;
    @JsonProperty("ValidateFlag")
    private String validateFlag;
    @JsonProperty("NumberSearch")
    private String numberSearch;
    @JsonProperty("IsAutoAdjustField")
    private String isAutoAdjustField;
    @JsonProperty("InterationFlags")
    private String interationFlags;
    @JsonProperty("IgnoreInterationFlag")
    private String ignoreInterationFlag;
    @JsonProperty("IsControlPrecision")
    private String isControlPrecision;
    @JsonProperty("Model")
    private ModelDTO model;

    @NoArgsConstructor
    @Data
    public static class ModelDTO {
        @JsonProperty("FVOUCHERID")
        private Integer fvoucherid;
        @JsonProperty("FAccountBookID")
        private FAccountBookIDDTO fAccountBookID;
        @JsonProperty("FDate")
        private String fDate;
        @JsonProperty("FBUSDATE")
        private String fbusdate;
        @JsonProperty("FYEAR")
        private Integer fyear;
        @JsonProperty("FPERIOD")
        private Integer fperiod;
        @JsonProperty("FVOUCHERGROUPID")
        private FVOUCHERGROUPIDDTO fvouchergroupid;
        @JsonProperty("FVOUCHERGROUPNO")
        private String fvouchergroupno;
        @JsonProperty("FISADJUSTVOUCHER")
        private Boolean fisadjustvoucher;
        @JsonProperty("FSourceBillKey")
        private FSourceBillKeyDTO fSourceBillKey;
        @JsonProperty("FDocumentStatus")
        private String fDocumentStatus;
        @JsonProperty("FEntity")
        private List<FEntityDTO> fEntity;

        @NoArgsConstructor
        @Data
        public static class FAccountBookIDDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FVOUCHERGROUPIDDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FSourceBillKeyDTO {
            @JsonProperty("FNumber")
            private String fNumber;
        }

        @NoArgsConstructor
        @Data
        public static class FEntityDTO {
            @JsonProperty("FEXPLANATION")
            private String fexplanation;
            @JsonProperty("FACCOUNTID")
            private FACCOUNTIDDTO faccountid;
            @JsonProperty("FCURRENCYID")
            private FCURRENCYIDDTO fcurrencyid;
            @JsonProperty("FEXCHANGERATETYPE")
            private FEXCHANGERATETYPEDTO fexchangeratetype;
            @JsonProperty("FEXCHANGERATE")
            private Double fexchangerate;
            @JsonProperty("FAMOUNTFOR")
            private Double famountfor;
            @JsonProperty("FAmount")
            private Double FAmount;
            @JsonProperty("FDEBIT")
            private Double fdebit;
            @JsonProperty("FDC")
            private String fdc;
            @JsonProperty("DC")
            private String dc;

            @JsonProperty("FDetailID")
            private FDetailIDDTO fDetailID;
            @JsonProperty("FCREDIT")
            private Double fcredit;



            @NoArgsConstructor
            @Data
            public static class FACCOUNTIDDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            public static class FCURRENCYIDDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            public static class FEXCHANGERATETYPEDTO {
                @JsonProperty("FNumber")
                private String fNumber;
            }

            @NoArgsConstructor
            @Data
            public static class FDetailIDDTO {
                @JsonProperty("FDETAILID__FFLEX4")
                private FDETAILIDFFLEX4DTO FDETAILID__FFLEX4;
                @JsonProperty("FDETAILID__FFLEX6")
                private FDETAILIDFFLEX6DTO FDETAILID__FFLEX6;

                @JsonProperty("FDETAILID__FF100004")
                private FDETAILIDFF100004DTO FDETAILID__FF100004;

                @NoArgsConstructor
                @Data
                public static class FDETAILIDFF100004DTO {
                    @JsonProperty("FNumber")
                    private String fNumber;
                }

                @NoArgsConstructor
                @Data
                public static class FDETAILIDFFLEX4DTO {
                    @JsonProperty("FNumber")
                    private String fNumber;
                }

                @NoArgsConstructor
                @Data
                public static class FDETAILIDFFLEX6DTO {
                    @JsonProperty("FNumber")
                    private String fNumber;
                }

            }
        }
    }
}
